{*
 * Copyright (c) 2008 - 2009 - ABSoft - Immanuel192
 * Change logs
 * 10-01-2010       immanuel192     Remove JS loader and CSS loader
                                    CSS has been loaded in themes/css folder
                                    JS has been loaded in index.php
 *}
{literal}
<script type="text/javascript"> 
 
    $(document).ready(function(){ 
        $("ul.sf-menu").superfish(
        {
        	delay:       500,                            // one second delay on mouseout 
            animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
            speed:       'fast',                          // faster animation speed 
            autoArrows:  false,                           // disable generation of arrow mark-up 
            dropShadows: true                           // disable drop shadows 
        }
        );  
    }); 
</script>
{/literal}
<div style="margin-left:30px; margin-top:0px">
<ul class="sf-menu sf-vertical">
		{assign var=startdepth value=0}
		{foreach name="children" key=key from=$sections item=section}
		{assign var=nextkey value=`$key+1`}
		{assign var=previouskey value=`$key-1`}

		{if $sections[$previouskey]->depth < $section->depth && $smarty.foreach.children.first!=true}
		<ul>
		{/if}

		{if $section->active == 1}
			<li class="" style="">
			<a href="{$section->link}">{if $section->parent==0}<b>{/if}{$section->name}{if $section->parent==0}</b>{/if}</a>
			{if $sections[$nextkey]->depth == $section->depth}</li>{/if}
		{else }
			<li>
				<a href="#">{$section->name}</a>
			{if $sections[$nextkey]->depth == $section->depth}</li>{/if}
		{/if}

		{if $sections[$nextkey]->depth < $section->depth}
			{if $smarty.foreach.children.last==true}
				{assign var=nextdepth value=$startdepth}
			{else}
				{assign var=nextdepth value=$sections[$nextkey]->depth}
			{/if}
			{math equation="x-y" x=$section->depth y=$nextdepth assign=looper}
			{section name="close" loop=$looper}
						</li>
					</ul>

			{/section}
				</li>
		{/if}

		{/foreach}
	</ul>
	</div>
